home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Views / ViewCell / CellUpdater.cp < prev    next >
Text File  |  2000-06-23  |  619b  |  34 lines

  1. // CellUpdater.cp
  2.  
  3. #ifndef CellUpdater_h
  4. #include "CellUpdater.h"
  5. #endif
  6. #ifndef ViewCell_h
  7. #include "ViewCell.h"
  8. #endif
  9. #ifndef RegionObject_h
  10. #include "RegionObject.h"
  11. #endif
  12. #ifndef Canvas_h
  13. #include "Canvas.h"
  14. #endif
  15. #ifndef CanvasMaintainer_h
  16. #include "CanvasMaintainer.h"
  17. #endif
  18.  
  19. CellUpdater::CellUpdater( const RegionObject& target )
  20.   : CellVisitor( target.Bounds() ),
  21.      toUpdate( target )
  22.   {
  23.   }
  24.  
  25. void CellUpdater::Visit( ViewCell& cell,
  26.                                  const Canvas& canvas )
  27.   {
  28.     if ( canvas.Visible() && canvas.Clip().Intersects( toUpdate ) )
  29.       {
  30.         CanvasMaintainer cm( canvas );
  31.         cell.Draw( canvas );
  32.       }
  33.   }
  34.